package com.perfma.xtest.web;

import com.perfma.xtest.boss.Demo;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@EnableAutoConfiguration
public class IndexController {

    @RequestMapping("/")
    public ModelMap index(HttpServletRequest request){
        ModelMap map = new ModelMap();
        map.put("success",true);
        return map;
    }

    @GetMapping("/s")
    public void s(HttpServletRequest request) throws Exception {
        Demo.start();
    }
}
